
%labels = ['A' 'B' 'C' 'D' 'F' 'H' 'K' 'M' 'O' 'P' 'S' 'W' 'Z']';
labels = ['G'];

for i=1:numel(labels)
    class = labels(i);
    %path = ['./images/training/' class '/'];
    path = './images/test/easy/';
    filenames1 = dir([path '*.jpg']); filenames1 = {filenames1(:).name};
    filenames2 = dir([path '*.JPG']); filenames2 = {filenames2(:).name};
    filenames = horzcat(filenames1,filenames2);
    
    for j=1:numel(filenames);
        filename = filenames{j};
        I = imread([path filename]);
        [m n ~] = size(I);
        
        maxDim = max(m,n);
        if maxDim == m
            newI = imresize(I, [300 NaN]);
        else
            newI = imresize(I, [NaN 300]);
        end
        
        imwrite(newI, ['./tempOutFolder/' filename(1:end-4) '.jpg'], 'JPEG');
    end
    
end
%%
